package com.dukun.mybatis.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.dukun.mybatis.enums.GradeEnum;
import com.dukun.mybatis.handler.ListTypeHandler;
import com.fasterxml.jackson.databind.annotation.JsonTypeResolver;
import com.sun.istack.internal.NotNull;
import lombok.Data;

import java.util.List;

/**
 * author：dukun
 * date：2021/10/20
 */
@Data
@TableName(value = "grade")
public class Grade {

    @TableId(type = IdType.AUTO)
    private Integer id;

    private String name;

    private Integer age;

    private GradeEnum grade;

    @TableField(typeHandler = ListTypeHandler.class)
    private List<String> hobbies;
}
